package com.yww.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yww.entity.RoleModules;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 雯雯yang
 * @since 2020-05-20
 */
public interface RoleModulesMapper extends BaseMapper<RoleModules> {
    /**
     * 根据角色id获取角色权限
     * @param roleId
     * @return
     */
    @Select("select mods_id from role_modules where roles_id=#{roleId}")
    List<Integer> getModulesIdsByRoleId(@RequestParam Integer roleId);
}
